package calvin.study.springboot;

import java.sql.DriverManager;
import java.sql.SQLException;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import calvin.study.springboot.model.Pet;
import calvin.study.springboot.model.User;

/**
 * Hello world!
 *
 */

@SpringBootApplication
public class App {
	public static void main(String[] args) throws SQLException {
		ConfigurableApplicationContext context = SpringApplication.run(App.class, args);

		// 2、查看容器里面的组件
		String[] names = context.getBeanDefinitionNames();
		// for (String name : names) {
		// System.out.println(name);
		// }

		Pet pet = context.getBean(Pet.class);
		System.out.println(pet);

	}
}
